package com.kantboot.api.email.web.admin.controller;

import com.kantboot.api.email.domain.dto.ApiEmailSearchDTO;
import com.kantboot.api.email.domain.entity.ApiEmail;
import com.kantboot.api.email.service.IApiEmailService;
import com.kantboot.util.common.result.RestResult;
import com.kantboot.util.core.controller.BaseAdminController;
import com.kantboot.util.core.param.PageParam;
import com.kantboot.util.core.result.PageResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api-email-web/admin/email")
public class ApiEmailControllerOfAdmin
extends BaseAdminController<ApiEmail,Long> {

    @Resource
    private IApiEmailService service;

    @RequestMapping("/getBodyData")
    public RestResult<PageResult> getBodyData(@RequestBody PageParam<ApiEmailSearchDTO> pageParam){
        return RestResult.success(service.getBodyData(pageParam),"getSuccess","获取成功");
    }
}
